<template>
  <div class="storeAdd_module">
    <el-tabs v-model="currentTab">
      <el-tab-pane
        v-for="item in tabList"
        :key="item.code"
        :name="item.code"
        :label="item.title"
      >
      </el-tab-pane>
    </el-tabs>

    <div class="content">
        <template v-if="currentTab === 'basicInformation'">
        <basicInformation></basicInformation>
      </template>
      <template v-if="currentTab === 'corporateInformation'">
        <corporateInformation></corporateInformation>
      </template>
      <template v-if="currentTab === 'storelocation'">
        <storelocation></storelocation>
      </template>
      </div>
  </div>
</template>

<script setup lang="ts">
import { ref } from "vue";
import {useI18n} from "vue-i18n"
import basicInformation from "./components/basicInformation.vue"
import corporateInformation from "./components/corporateInformation.vue"
import storelocation from "./components/storelocation.vue"

const { t } = useI18n()
interface TabLstDataType {
  title: string;
  code: string;
}
const currentTab = ref("basicInformation");
const tabList = ref<TabLstDataType[]>([
  {
    title: t("storeManagement_baseInfo"), // 基础信息
    code: "basicInformation",
  },
  {
    title: t("storeManagement_corporateInformation"),
    code: "corporateInformation", // 法人信息
  },
  {
    title: t("storeManagement_storelocation"), // 店铺地址
    code: "storelocation",
  },
]);
</script>
<style scoped>
.storeAdd_module {
  height: calc(100% - 40px);
}
.content {
  padding: 10px 20px;
  height: calc(100% - 43px);
  overflow-y: auto;
  box-sizing: border-box;
}</style>
